import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: () => import('@/views/layout/LayoutContainer.vue'),
      redirect: '/NewsUpdates',
      children: [
        // 新闻资讯
        {
          path: '/NewsUpdates',
          component: () => import('@/views/page/NewsUpdates/NewsUpdates.vue')
        },
        // 知识分享
        {
          path: '/KnowledgeBase',
          component: () =>
            import('@/views/page/KnowledgeBase/KnowledgeBase.vue')
        },
        // 项目经历
        {
          path: '/ProjectExperience',
          component: () =>
            import('@/views/page/ProjectExperience/ProjectExperience.vue')
        },
        // 客户消息
        {
          path: '/CustomerMessage',
          component: () =>
            import('@/views/page/CustomerMessage/CustomerMessage.vue')
        },
        // 权限管理
        {
          path: '/AccessControl',
          component: () =>
            import('@/views/page/AccessControl/AccessControl.vue')
        },
        // 个人中心
        {
          path: '/PersonalCenter',
          component: () =>
            import('@/views/page/PersonalCenter/PersonalCenter.vue')
        },
        // 测试
        {
          path: '/aaa',
          component: () => import('@/views/page/AAA/AAA.vue')
        }
      ]
    }
  ]
})

export default router
